﻿@model DynamicLinqWebDocs.ViewModels.Method

@{
    var title = "." + Model.Name + " (" + String.Join(", ", Model.Arguments.Select(x => x.Type)) + ")";

    ViewBag.Title = Model.Class + @title + " Method";
            
    var remarks = String.IsNullOrEmpty(Model.Remarks) ? "No Remarks" : Model.Remarks;
}

<h2>@Html.ActionLink(Model.Class, "Class", "Library", new { className = Model.Class }, null)@title <small>Method</small></h2>

@Html.FormatMarkdown(Model.Description)

@Html.FormatMarkdown("**Namespace**: `{0}`", Model.Namespace)

<h3>Syntax</h3>
@Html.FormatCodeBlock(Model.GenerateCSharpSyntaxCode())

@if (Model.Arguments.Count > 0)
{
    <h4>Parameters</h4>    
    foreach (var arg in Model.Arguments)
    {
        <em>@arg.Name</em><br />
        @Html.FormatMarkdown("Type: `{0}.{1}`<br />{2}", arg.TypeNamespace, arg.Type, arg.Description)
    }
}

@if (Model.ReturnType != null)
{
    <h4>Return Value</h4>
    @Html.FormatMarkdown("Type: `{0}`<br />{1}", Model.ReturnType, Model.ReturnDescription)
}

@Html.DisplayFor(x => x.Remarks, "Remarks")
@Html.DisplayFor(x => x.Examples, "Examples")

<h3>Supported in NET Framework <br /><small>@Helpers.GetEnumDescription(Model.Frameworks)</small></h3>
